Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust default value for volume down step #70

Merged
merged 1 commit into from
Sep 29, 2024

Conversation

mathebox
Copy link
Collaborator

@mathebox mathebox commented Sep 8, 2024

This pull request adjusts the default value for the volume step down to a positive integer.
Config flow requires the value in a range of positive integers.

vol.Required(
OPTION_CHANGE_STEP_VOLUME_DOWN,
default=self.config_entry.options.get(
OPTION_CHANGE_STEP_VOLUME_DOWN,
DEFAULT_CHANGE_STEP_VOLUME_DOWN,
),
): vol.All(int, vol.Range(min=1, max=20)),

Afterward, this value is multiplied by -1 for the correct volume change.

-1 * self._raumfeld.options[OPTION_CHANGE_STEP_VOLUME_DOWN]

Hence, the default value needs to be a positive integer as well.

Fixes #54

@B5r1oJ0A9G B5r1oJ0A9G merged commit a14f08d into B5r1oJ0A9G:master Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Volume goes up at media_player.volume_down
2 participants